#include "line.h"
#include "Color.h"

// constructor
Line::Line()
{
	start = Color::zero;
	end = Color::one;
	color = Color::one;
}

Line::Line(Vector start, Vector end)
{
	this->start = start;
	this->end = end;
	color = Color::one;
}

Line::Line(Vector start, Vector end, Vector color)
{
	this->start = start;
	this->end = end;
	this->color = color;
}

void Line::setColor(Vector color)
{
	this->color = color;
}

void Line::draw()
{

	

	glColor3f(color.x, color.y, color.z);
	glBegin(GL_LINES);
		glVertex3f(start.x, start.y, start.z);
		glVertex3f(end.x, end.y, end.z);
	glEnd();

		
	/*glPointSize(10.0f);
	glBegin(GL_POINTS);
		//glColor3f(0, 1.0f, 0);
		//glVertex3f(start.x, start.y, start.z);
		//glColor3f(1.0f, 0, 0);
		glVertex3f(end.x, end.y, end.z);
	glEnd();*/
}



